<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>文件上传</title>
<script type="text/javascript">
	function down(fname){
		document.getElementById("fname").value = fname;
	}
	function del(fname){
		document.getElementById("fname").value = fname;
		document.forms["downForm"].action ="/down/del";
	}
</script>
</head>
<body>
	文件列表
	<form name="downForm" action="/down" method="post">
		<table border="1" width="100%"  cellspacing="0" cellpadding="0">
			<tr>
				<td colspan="5">${msg!''}</td>
			</tr>
			<tr>
				<td>文件名</td>
				<td>文件大小</td>
				<td>上传时间</td>
				<td></td>
				<td></td>
			</tr>
			<#list fileList as file>
			<tr>
				<td>${file.fname!''}</td>
				<td>${file.formatSize!''}</td>
				<td>${file.createTime!''}</td>
				<#setting url_escaping_charset='utf-8'>
				
				<td><input type="submit" onclick="del('${file.fname!''}')"
					value="删除" /></td>
				<td><input type="submit" onclick="down('${file.fname!''}')"
					value="下载" /></td>
			</tr>
			</#list>
		</table>
		<input id="fname" type="hidden" name="fname" value="" />
	</form>
	<form action="/upload/save" method="post" enctype="multipart/form-data">
		<table>
			<tr>
				<td>文件</td>
				<td><input type="file" name="myfile" value="" /></td>
			</tr>
			<tr>
				<td colspan="2"><input type="submit" value="上传" /><font color="red">提示：上传单个文件最大100M</font></td>
			</tr>
			<tr>
				<td colspan="2">${msg!''}</td>
			</tr>
		</table>
	</form>
</body>
</html>